<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\widgets\DetailView;
use yii\widgets\Pjax;
use dmstr\bootstrap\Tabs;

/**
* @var yii\web\View $this
* @var yiike\store\models\Goods $model
*/
$copyParams = $model->attributes;

$this->title = Yii::t('models', 'Goods');
$this->params['breadcrumbs'][] = ['label' => Yii::t('models', 'Goods'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => (string)$model->title, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'View';
?>
<!-- flash message -->
<?php if (\Yii::$app->session->getFlash('deleteError') !== null) : ?>
        <span class="alert alert-info alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span></button>
            <?= \Yii::$app->session->getFlash('deleteError') ?>
        </span>
    <?php endif; ?>
<div class="box box-info giiant-crud goods-view">
    <div class="box-header with-border">
        <div class="box-title">
            <?= $this->title ?>        </div>
    </div>

    <div class="box-body">

        <div class="clearfix crud-navigation">

            <!-- menu buttons -->
            <div class='pull-left'>
                <?= Html::a(
                '<span class="glyphicon glyphicon-pencil"></span> ' . '编辑',
                [ 'update', 'id' => $model->id],
                ['class' => 'btn btn-info']) ?>

                <?= Html::a(
                '<span class="glyphicon glyphicon-plus"></span> ' . '新增',
                ['create'],
                ['class' => 'btn btn-success']) ?>
            </div>

            <div class="pull-right">
                <?= Html::a('<span class="glyphicon glyphicon-list"></span> '
                . 'Full list', ['index'], ['class'=>'btn btn-default']) ?>
            </div>

        </div>

        <hr/>

        <?php $this->beginBlock('yiike\store\models\Goods'); ?>

        
        <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
                'weid',
        'title',
        'cid',
        'ccid',
        'store_id',
        'logo',
        'image:ntext',
        'price',
        'content:ntext',
        'quan_rule',
        'type',
        'top',
        'orderby',
        'sold',
        'full_num_shipping',
        'invoice',
        'status',
        'sale_time_start:datetime',
        'sale_time_end:datetime',
        'hide_search',
        'no_return',
        'weight',
        'stock',
        'stock_rule',
        'is_spec',
        'max_buy',
        'min_buy',
        'give_credit1',
        'no_shipping:ntext',
        'property:ntext',
        'orig_price',
        'cost_price',
        'full_money_shipping',
        'shipping_fee',
        'commision',
        'goods_sn',
        'sub_title',
        'short_title',
        'keyword',
        'tag',
        'location_p',
        'location_c',
        'share_image',
        'share_title',
        'share_content',
        ],
        ]); ?>

        
        <hr/>

        <?= Html::a('<span class="fa fa-trash-o"></span> ' . '删除', ['delete', 'id' => $model->id],
        [
        'class' => 'btn btn-danger',
        'data-confirm' => '' . '确认删除?' . '',
        'data-method' => 'post',
        ]); ?>
        <?php $this->endBlock(); ?>


        
        <?= Tabs::widget(
                     [
                         'id' => 'relation-tabs',
                         'encodeLabels' => false,
                         'items' => [
     [
        'label'   => '<b class=""># '.Html::encode($model->id).'</b>',
        'content' => $this->blocks['yiike\store\models\Goods'],
        'active'  => true,
    ],
 ]
                     ]
        );
        ?>    </div>
</div>
